<ui:composition template="/WEB-INF/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:define name="menu1">
		<ui:include src="/WEB-INF/template/menuProfessor.xhtml" />
	</ui:define>
	
	<ui:define name="main1">

		<h:form>
		
			<h:panelGrid columns="2">
			
				<h:outputLabel value="Descrição" for="descricao" />
				<h:inputText value="#{formularioBean.formulario.descricao}"
					id="descricao" required="true" requiredMessage="Preencha o campo de descrição" />

				<h:outputLabel value="Data Início" for="data-inicio" />
				<p:calendar value="#{formularioBean.formulario.dataInicio}" 
					locale="pt_BR" showButtonPanel="true" navigator="true"
					id="data-inicio" required="true" requiredMessage="Preencha o campo de data inicial"  />

				<h:outputLabel value="Data Fim" for="data-fim" />
				<p:calendar value="#{formularioBean.formulario.dataFim}" 
					locale="pt_BR" showButtonPanel="true" navigator="true"
					id="data-fim" required="true" requiredMessage="Preencha o campo de data final"  />
	
				<h:inputHidden value="#{formularioBean.formulario.id}" />	
				<h:commandButton  class="btn btn-primary" value="Salvar"
					action="#{formularioBean.atualizaFormulario}" />	
			
			</h:panelGrid>
		
		</h:form>			

	</ui:define>



	<ui:define name="information">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h4 class="panel-title">#{usuario.nome}</h4>
			</div>
			<div class="panel-body">
				<img
					src="#{facesContext.externalContext.requestContextPath}/resources/images/noavatar.jpg"
					alt="no-avatar" />
				<h5>#{usuario.login}</h5>
				<h5>#{usuario.email}</h5>
			</div>
		</div>
	</ui:define>
</ui:composition>